<!--
档案管理-档案管理查看
 add by yyp 2020-01-10
-->
<template lang="pug">
  kalix-dialog.user-add(title='查看' bizKey="File" ref="kalixBizDialog"  v-bind:formModel.sync="formModel" isView)
    div.el-form(slot="dialogFormSlot")
      template(slot="tableColumnSlot")
      el-form-item(label="病患姓名" prop="name" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.name" readonly)
      el-form-item(label="病患年龄" prop="age" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.age" readonly)
      el-form-item(label="病患性别" prop="sex" v-bind:label-width="labelWidth" )
        el-radio(v-model="sse" label="1" readonly disabled) 男
        el-radio(v-model="sse" label="2" readonly disabled) 女
      el-form-item(label="申请医师" prop="doctor" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.doctor" readonly)
      el-form-item(label="申请时间" prop="applicationTime"  v-bind:label-width="labelWidth"  align="center")
        el-input(v-model="date2" readonly)
      el-form-item(label="原切片单位" prop="unitName" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.unitName" readonly)
      el-form-item(label="切片类别" prop="cname" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.cname" readonly)
      el-form-item(label="病理号" prop="pathologyNum" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.pathologyNum" readonly)
      el-form-item(label="临床诊断" prop="diagnosis" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.diagnosis" type="textarea" readonly)
      el-form-item(label="详细临床诊断" prop="diagnosisDetail" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.diagnosisDetail" type="textarea" readonly)
      el-form-item(label="报告状态" prop="status" v-bind:label-width="labelWidth" )
        el-input(v-model="formModel.status" readonly)
</template>

<script type="text/ecmascript-6">
  import FormModel from './model'
  import KalixClansmanUpload from '../../../../../components/fileUpload/upload'
  import {baseURL} from '../../../../../config/global.toml'
  import KalixSelect from '../../../../../components/corelib/components/common/baseSelect'
  import VuePlayer from '../../../../../components/corelib/components/common/vue-player.vue'
  import KalixImgUpload from '../../../../../components/corelib/components/common/imgUpload'
  export default {
    name: 'fileView',
    components: {
      KalixSelect,
      KalixClansmanUpload,
      VuePlayer,
      KalixImgUpload
    },
    data() {
      return {
        sse: null,
        action: baseURL + '/camel/rest/upload',
        formModel: Object.assign({}, FormModel),
        labelWidth: '130px',
        date2: null
      }
    },
    mounted() {
      // console.log('sse', this.sse)
    },
    methods: {
      init(dialogOption) {
        let date = this.formModel.applicationTime
        let date1 = date.indexOf(' ')
        this.date2 = date.substring(0, date1)
        if (this.formModel.sex === '2') {
          this.sse = '2'
        } else {
          this.sse = '1'
        }
        console.log('sse', this.sse)
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">
  .el-form
    width 50%
    margin auto
    .radio
      margin-left 150px
      margin-bottom 20px
      .el-radio
        color: #3465cb
        font-weight: bold
        font-size: 14px
</style>
